package com.itheima.jobs;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 自定义SpringTaskJob注解方式
 */
@Component
public class SpringTaskJobAnnotationDemo {

    @Scheduled(cron = "0/10 * * * * ?")
    public void run(){
        System.out.println("自定义SpringTaskJob执行了。。。" + new Date());
    }

}
